﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdverseEventReportSystem.Utils {
    /// <summary>
    /// 日志处理接口
    /// </summary>
    public interface ILog {
        /// <summary>
        /// 记录错误日志
        /// </summary>
        /// <param name="msg">错误信息</param>
        void ToError(object msg);

        /// <summary>
        /// 记录错误日志
        /// </summary>
        /// <param name="msg">错误信息</param>
        /// <param name="ex">异常信息</param>
        void ToError(object msg, Exception ex);

        /// <summary>
        /// 记录调试日志
        /// </summary>
        /// <param name="msg">调试信息</param>
        void ToDebug(object msg);

        /// <summary>
        /// 记录调试日志
        /// </summary>
        /// <param name="msg">调试信息</param>
        /// <param name="ex">异常信息</param>
        void ToDebug(object msg, Exception ex);

        /// <summary>
        /// 记录致命日志
        /// </summary>
        /// <param name="msg">错误信息</param>
        void ToFatal(object msg);

        /// <summary>
        /// 记录致命日志
        /// </summary>
        /// <param name="msg">错误信息</param>
        /// <param name="ex">异常信息</param>
        void ToFatal(object msg, Exception ex);

        /// <summary>
        /// 记录普通日志
        /// </summary>
        /// <param name="msg">信息内容</param>
        void ToInfo(object msg);

        /// <summary>
        /// 记录普通日志
        /// </summary>
        /// <param name="msg">信息内容</param>
        /// <param name="ex">异常信息</param>
        void ToInfo(object msg, Exception ex);

        /// <summary>
        /// 记录警告日志
        /// </summary>
        /// <param name="msg">信息内容</param>
        void ToWarn(object msg);

        /// <summary>
        /// 记录警告日志
        /// </summary>
        /// <param name="msg">信息内容</param>
        /// <param name="ex">异常信息</param>
        void ToWarn(object msg, Exception ex);
    }
}
